d={"Jan":1, "Feb":2, "Mar":3}
g=input()
if g in d:
    print(d[g])
else:
    print("NO")